3.382 \(\int (a+b \tan ^4(c+d x))^3 \, dx\)

Optimal. Leaf size=144 \[ \frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+x (a+b)^3+\frac {b^3 \tan ^{11}(c+d x)}{11 d}-\frac {b^3 \tan ^9(c+d x)}{9 d} \]

[Out]

(a+b)^3*x-b*(3*a^2+3*a*b+b^2)*tan(d*x+c)/d+1/3*b*(3*a^2+3*a*b+b^2)*tan(d*x+c)^3/d-1/5*b^2*(3*a+b)*tan(d*x+c)^5
/d+1/7*b^2*(3*a+b)*tan(d*x+c)^7/d-1/9*b^3*tan(d*x+c)^9/d+1/11*b^3*tan(d*x+c)^11/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3661, 1154, 203} \[ \frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+x (a+b)^3+\frac {b^3 \tan ^{11}(c+d x)}{11 d}-\frac {b^3 \tan ^9(c+d x)}{9 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[c + d*x]^4)^3,x]

[Out]

(a + b)^3*x - (b*(3*a^2 + 3*a*b + b^2)*Tan[c + d*x])/d + (b*(3*a^2 + 3*a*b + b^2)*Tan[c + d*x]^3)/(3*d) - (b^2
*(3*a + b)*Tan[c + d*x]^5)/(5*d) + (b^2*(3*a + b)*Tan[c + d*x]^7)/(7*d) - (b^3*Tan[c + d*x]^9)/(9*d) + (b^3*Ta
n[c + d*x]^11)/(11*d)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1154

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a
 + c*x^4)^p, x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 3661

Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x]
, x]}, Dist[(c*ff)/f, Subst[Int[(a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ
[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \left (a+b \tan ^4(c+d x)\right )^3 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b x^4\right )^3}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-b \left (3 a^2+3 a b+b^2\right )+b \left (3 a^2+3 a b+b^2\right ) x^2-b^2 (3 a+b) x^4+b^2 (3 a+b) x^6-b^3 x^8+b^3 x^{10}+\frac {(a+b)^3}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^3 \tan ^9(c+d x)}{9 d}+\frac {b^3 \tan ^{11}(c+d x)}{11 d}+\frac {(a+b)^3 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=(a+b)^3 x-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^3 \tan ^9(c+d x)}{9 d}+\frac {b^3 \tan ^{11}(c+d x)}{11 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.07, size = 128, normalized size = 0.89 \[ \frac {b \tan (c+d x) \left (1155 \left (3 a^2+3 a b+b^2\right ) \tan ^2(c+d x)-3465 \left (3 a^2+3 a b+b^2\right )+495 b (3 a+b) \tan ^6(c+d x)-693 b (3 a+b) \tan ^4(c+d x)+315 b^2 \tan ^{10}(c+d x)-385 b^2 \tan ^8(c+d x)\right )}{3465 d}+\frac {(a+b)^3 \tan ^{-1}(\tan (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[c + d*x]^4)^3,x]

[Out]

((a + b)^3*ArcTan[Tan[c + d*x]])/d + (b*Tan[c + d*x]*(-3465*(3*a^2 + 3*a*b + b^2) + 1155*(3*a^2 + 3*a*b + b^2)
*Tan[c + d*x]^2 - 693*b*(3*a + b)*Tan[c + d*x]^4 + 495*b*(3*a + b)*Tan[c + d*x]^6 - 385*b^2*Tan[c + d*x]^8 + 3
15*b^2*Tan[c + d*x]^10))/(3465*d)

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 145, normalized size = 1.01 \[ \frac {315 \, b^{3} \tan \left (d x + c\right )^{11} - 385 \, b^{3} \tan \left (d x + c\right )^{9} + 495 \, {\left (3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{7} - 693 \, {\left (3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{5} + 1155 \, {\left (3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{3} + 3465 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} d x - 3465 \, {\left (3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )}{3465 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+tan(d*x+c)^4*b)^3,x, algorithm="fricas")

[Out]

1/3465*(315*b^3*tan(d*x + c)^11 - 385*b^3*tan(d*x + c)^9 + 495*(3*a*b^2 + b^3)*tan(d*x + c)^7 - 693*(3*a*b^2 +
 b^3)*tan(d*x + c)^5 + 1155*(3*a^2*b + 3*a*b^2 + b^3)*tan(d*x + c)^3 + 3465*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*d*
x - 3465*(3*a^2*b + 3*a*b^2 + b^3)*tan(d*x + c))/d

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+tan(d*x+c)^4*b)^3,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [A]  time = 0.03, size = 252, normalized size = 1.75 \[ \frac {b^{3} \left (\tan ^{11}\left (d x +c \right )\right )}{11 d}-\frac {b^{3} \left (\tan ^{9}\left (d x +c \right )\right )}{9 d}+\frac {3 \left (\tan ^{7}\left (d x +c \right )\right ) a \,b^{2}}{7 d}+\frac {\left (\tan ^{7}\left (d x +c \right )\right ) b^{3}}{7 d}-\frac {3 a \,b^{2} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}-\frac {b^{3} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}+\frac {\left (\tan ^{3}\left (d x +c \right )\right ) a^{2} b}{d}+\frac {a \,b^{2} \left (\tan ^{3}\left (d x +c \right )\right )}{d}+\frac {b^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}-\frac {3 a^{2} b \tan \left (d x +c \right )}{d}-\frac {3 a \,b^{2} \tan \left (d x +c \right )}{d}-\frac {b^{3} \tan \left (d x +c \right )}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) a^{3}}{d}+\frac {3 \arctan \left (\tan \left (d x +c \right )\right ) a^{2} b}{d}+\frac {3 \arctan \left (\tan \left (d x +c \right )\right ) a \,b^{2}}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) b^{3}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(d*x+c)^4)^3,x)

[Out]

1/11*b^3*tan(d*x+c)^11/d-1/9*b^3*tan(d*x+c)^9/d+3/7/d*tan(d*x+c)^7*a*b^2+1/7/d*tan(d*x+c)^7*b^3-3/5*a*b^2*tan(
d*x+c)^5/d-1/5*b^3*tan(d*x+c)^5/d+1/d*tan(d*x+c)^3*a^2*b+a*b^2*tan(d*x+c)^3/d+1/3/d*b^3*tan(d*x+c)^3-3/d*a^2*b
*tan(d*x+c)-3*a*b^2*tan(d*x+c)/d-1/d*b^3*tan(d*x+c)+1/d*arctan(tan(d*x+c))*a^3+3/d*arctan(tan(d*x+c))*a^2*b+3/
d*arctan(tan(d*x+c))*a*b^2+1/d*arctan(tan(d*x+c))*b^3

________________________________________________________________________________________

maxima [A]  time = 0.77, size = 167, normalized size = 1.16 \[ a^{3} x + \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{2} b}{d} + \frac {{\left (15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x + 105 \, c - 105 \, \tan \left (d x + c\right )\right )} a b^{2}}{35 \, d} + \frac {{\left (315 \, \tan \left (d x + c\right )^{11} - 385 \, \tan \left (d x + c\right )^{9} + 495 \, \tan \left (d x + c\right )^{7} - 693 \, \tan \left (d x + c\right )^{5} + 1155 \, \tan \left (d x + c\right )^{3} + 3465 \, d x + 3465 \, c - 3465 \, \tan \left (d x + c\right )\right )} b^{3}}{3465 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+tan(d*x+c)^4*b)^3,x, algorithm="maxima")

[Out]

a^3*x + (tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))*a^2*b/d + 1/35*(15*tan(d*x + c)^7 - 21*tan(d*x + c)^5
+ 35*tan(d*x + c)^3 + 105*d*x + 105*c - 105*tan(d*x + c))*a*b^2/d + 1/3465*(315*tan(d*x + c)^11 - 385*tan(d*x
+ c)^9 + 495*tan(d*x + c)^7 - 693*tan(d*x + c)^5 + 1155*tan(d*x + c)^3 + 3465*d*x + 3465*c - 3465*tan(d*x + c)
)*b^3/d

________________________________________________________________________________________

mupad [B]  time = 11.66, size = 180, normalized size = 1.25 \[ \frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a^2\,b+a\,b^2+\frac {b^3}{3}\right )}{d}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,{\left (a+b\right )}^3}{a^3+3\,a^2\,b+3\,a\,b^2+b^3}\right )\,{\left (a+b\right )}^3}{d}-\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9\,d}+\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^{11}}{11\,d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (3\,a^2\,b+3\,a\,b^2+b^3\right )}{d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {b^3}{5}+\frac {3\,a\,b^2}{5}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (\frac {b^3}{7}+\frac {3\,a\,b^2}{7}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(c + d*x)^4)^3,x)

[Out]

(tan(c + d*x)^3*(a*b^2 + a^2*b + b^3/3))/d + (atan((tan(c + d*x)*(a + b)^3)/(3*a*b^2 + 3*a^2*b + a^3 + b^3))*(
a + b)^3)/d - (b^3*tan(c + d*x)^9)/(9*d) + (b^3*tan(c + d*x)^11)/(11*d) - (tan(c + d*x)*(3*a*b^2 + 3*a^2*b + b
^3))/d - (tan(c + d*x)^5*((3*a*b^2)/5 + b^3/5))/d + (tan(c + d*x)^7*((3*a*b^2)/7 + b^3/7))/d

________________________________________________________________________________________

sympy [A]  time = 3.18, size = 224, normalized size = 1.56 \[ \begin {cases} a^{3} x + 3 a^{2} b x + \frac {a^{2} b \tan ^{3}{\left (c + d x \right )}}{d} - \frac {3 a^{2} b \tan {\left (c + d x \right )}}{d} + 3 a b^{2} x + \frac {3 a b^{2} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {3 a b^{2} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {a b^{2} \tan ^{3}{\left (c + d x \right )}}{d} - \frac {3 a b^{2} \tan {\left (c + d x \right )}}{d} + b^{3} x + \frac {b^{3} \tan ^{11}{\left (c + d x \right )}}{11 d} - \frac {b^{3} \tan ^{9}{\left (c + d x \right )}}{9 d} + \frac {b^{3} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {b^{3} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {b^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {b^{3} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan ^{4}{\relax (c )}\right )^{3} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+tan(d*x+c)**4*b)**3,x)

[Out]

Piecewise((a**3*x + 3*a**2*b*x + a**2*b*tan(c + d*x)**3/d - 3*a**2*b*tan(c + d*x)/d + 3*a*b**2*x + 3*a*b**2*ta
n(c + d*x)**7/(7*d) - 3*a*b**2*tan(c + d*x)**5/(5*d) + a*b**2*tan(c + d*x)**3/d - 3*a*b**2*tan(c + d*x)/d + b*
*3*x + b**3*tan(c + d*x)**11/(11*d) - b**3*tan(c + d*x)**9/(9*d) + b**3*tan(c + d*x)**7/(7*d) - b**3*tan(c + d
*x)**5/(5*d) + b**3*tan(c + d*x)**3/(3*d) - b**3*tan(c + d*x)/d, Ne(d, 0)), (x*(a + b*tan(c)**4)**3, True))

________________________________________________________________________________________